package sfin.controller;

import sfin.service.PeriodoService;


public class PeriodoController{
	
	private PeriodoService periodoService;

	public PeriodoController(PeriodoService periodoService) {
		this.periodoService = periodoService;
	}
	
	public int getSelectedMonth() {
		return periodoService.getApplicationMonth();
	}
	
	public void setSelectedMonth(int monthIndex) {
		periodoService.changeCurrentApplicatioMonth(monthIndex);
	}
	
	public int getSelectedYear() {
		return periodoService.getCurrentApplicationYearIndex();
	}
	
	public void setSelectedYear(int yearIndex) {
		periodoService.changeCurrentApplicationYearIndex(yearIndex);
	}
	
	public void next(){
		periodoService.next();
	}
	
	public void back(){
		periodoService.back();
	}
	
	public String[] getYears(){
		return periodoService.getYearNames();
	}
	
	public String[] getMonths(){
		return periodoService.getMonths();
	}

	public int getYear(){
		return periodoService.getApplicationYear();
	}
	
	public String getCurrentMonthName(){
		return periodoService.getCurrentMonthName();
	}
	
}
